//
//  PersonalInformationFirstCell.swift
//  SwiftOfXiaoShouJia
//
//  Created by zhenjingxiong on 2018/9/6.
//  Copyright © 2018年 镇景雄. All rights reserved.
//

import UIKit

class PersonalInformationFirstCell: UITableViewCell {

    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
        self.layoutUI()
    }

    override init(style: UITableViewCellStyle, reuseIdentifier: String?) {
        super.init(style: style, reuseIdentifier: reuseIdentifier)
        self.selectionStyle = UITableViewCellSelectionStyle.none
        self.layoutUI()
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    func layoutUI() {
        self.addSubview(self.headPortraitLabel)
        self.headPortraitLabel.snp.makeConstraints { (make) in
            make.left.equalTo(20)
            make.centerY.equalTo(self)
        }
        
        self.addSubview(self.iconImageView)
        self.iconImageView.snp.makeConstraints { (make) in
            make.right.equalTo(self.snp.right).offset(-20)
            make.centerY.equalTo(self)
            make.size.equalTo(CGSize.init(width: 50, height: 50))
        }
    }
    
    lazy var headPortraitLabel: UILabel = {
        let headPortraitLabel = UILabel.init()
        headPortraitLabel.text = "头像"
        return headPortraitLabel
    }()
    
    lazy var iconImageView: UIImageView = {
        let iconImageView = UIImageView.init(image: UIImage.init(named: "avatar_default"))
        iconImageView.layerWithView(color: UIColor.clear, WithRadius: 25, WithBorder: 1)
        return iconImageView
    }()
    
    
    
    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }

}
